From: Keir Fraser Date: Thu, 8 May 2008 10:55:13 +0000 (+0100) Subject: minios: in non-x86 case, use wmb to enforce ordering between X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14215^2~46 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=aec0c76f2272eb6551a370a24a0c53b32efbb9bf;p=xen.git minios: in non-x86 case, use wmb to enforce ordering between evtchn_upcall_pending and evtchn_pending_sel stores. Signed-off-by: Samuel Thibault --- diff --git a/extras/mini-os/hypervisor.c b/extras/mini-os/hypervisor.c index 3bb47a424d..acc9494c01 100644 --- a/extras/mini-os/hypervisor.c +++ b/extras/mini-os/hypervisor.c @@ -46,7 +46,11 @@ void do_hypervisor_callback(struct pt_regs *regs) in_callback = 1; vcpu_info->evtchn_upcall_pending = 0; - /* NB. No need for a barrier here -- XCHG is a barrier on x86. */ + /* NB x86. No need for a barrier here -- XCHG is a barrier on x86. */ +#if !defined(__i386__) && !defined(__x86_64__) + /* Clear master flag /before/ clearing selector flag. */ + wmb(); +#endif l1 = xchg(&vcpu_info->evtchn_pending_sel, 0); while ( l1 != 0 ) {